package com.zbkj.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 移动端用户信息
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Schema(name = "移动端用户信息")
@TableName(value = "sys_user")
@Table(value = "sys_user")
public class UserInfo implements Serializable  {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    @Id(value = "user_id",keyType = KeyType.Auto)
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long id;

    /**
     * 登录名
     */
    @Schema(description = "登录名")
    @Column(value = "username")
    @TableField(value = "username")
    private String username;

    /**
     * 登录密码
     */
    @Schema(description = "登录密码")
    @Column(value = "password")
    @TableField(value = "password")
    private String password;

    /**
     * 登录密码盐值
     */
    @Schema(description = "登录密码盐值")
    @Column(value = "salt")
    @TableField(value = "salt")
    private String salt;

    /**
     * 手机号码
     */
    @Schema(description = "手机号码")
    @Column(value = "phone")
    @TableField(value = "phone")
    private String phone;

    /**
     * 用户头像
     */
    @Schema(description = "用户头像")
    @Column(value = "avatar")
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 用户昵称
     */
    @Schema(description = "用户昵称")
    @Column(value = "nickname")
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    @Column(value = "email")
    @TableField(value = "email")
    private String email;

    /**
     * 部门
     */
    @Schema(description = "部门")
    @Column(value = "dept_id")
    @TableField(value = "dept_id")
    private String deptId;

    /**
     * 锁定状态
     */
    @Schema(description = "锁定状态")
    @Column(value = "lock_flag")
    @TableField(value = "lock_flag")
    private String lockFlag;

    /**
     * 密码是否过期
     */
    @Schema(description = "密码是否过期")
    @Column(value = "password_expire_flag")
    @TableField(value = "password_expire_flag")
    private String passwordExpireFlag;

    /**
     * 密码是否过期
     */
    @Schema(description = "密码是否过期")
    @Column(value = "password_modify_time")
    @TableField(value = "password_modify_time")
    private String passwordModifyTime;

    /**
     * 删除标记
     */
    @Schema(description = "删除标记")
    @Column(value = "del_flag")
    @TableField(value = "del_flag")
    private String delFlag;

    /**
     * 微信登录openId
     */
    @Schema(description = "微信登录openId")
    @Column(value = "wx_openid")
    @TableField(value = "wx_openid")
    private String wxOpenId;

    /**
     * 小程序登录openId
     */
    @Schema(description = "小程序登录openId")
    @Column(value = "mini_openid")
    @TableField(value = "mini_openid")
    private String miniOpenId;

    /**
     * 商户id
     */
    @Schema(description = "商户id")
    @Column(value = "mer_id")
    @TableField(value = "mer_id")
    private String merId;

    /**
     * 身份证
     */
    @Column(value = "identity")
    @TableField(value = "identity")
    @Schema(description = "身份证")
    private Long identity;

    /**
     * 身份证名字
     */
    @Column(value = "identity_name")
    @TableField(value = "identity_name")
    @Schema(description = "身份证名字")
    private String identityName;

    /**
     * 身份证有效期开始
     */
    @Column(value = "identity_vld")
    @TableField(value = "identity_vld")
    @Schema(description = "身份证有效期开始")
    private LocalDateTime identityVld;

    /**
     * 身份证有效期结束
     */
    @Column(value = "identity_vld_end")
    @TableField(value = "identity_vld_end")
    @Schema(description = "身份证有效期结束")
    private LocalDateTime identityVldEnd;

    /**
     * 身份证图片(正面)
     */
    @Schema(description = "身份证图片")
    @Column(ignore = true)
    @TableField(exist = false)
    private String identityUrl;

    /**
     * 身份证图片(反面)
     */
    @Schema(description = "身份证图片")
    @Column(ignore = true)
    @TableField(exist = false)
    private String identityUrl1;

}
